{extend name="public/base"}

{block name="main"}
<!--添加用户UI-->
<form action="{:url('/user/'.$obj.id)}" method="post">
    <input type="hidden" name="_method" value="put">
    <fieldset class="w-75">
        <div class="form-group row">
            <label for="username" class="col-2 col-form-label">借用人</label>
            <div class="col-8">
                <input type="text" disabled value="{$obj.username}" id="username" name="username" class="form-control">
            </div>
            <span class="col-2 text-danger col-form-label">*</span>
        </div>
        <!--                    <div class="form-group row">-->
        <!--                        <label for="newpassword" class="col-2 col-form-label">新密码 </label>-->
        <!--                        <div class="col-8">-->
        <!--                            <input type="password" id="newpassword" name="newpassword" class="form-control" placeholder="请输入密码">-->
        <!--                        </div>-->
        <!--                        <span class="col-2 text-danger col-form-label">*</span>-->
        <!--                    </div>-->
        <!--                    <div class="form-group row">-->
        <!--                        <label for="newpasswordnot" class="col-2 col-form-label">密码确认</label>-->
        <!--                        <div class="col-8">-->
        <!--                            <input type="password" id="newpasswordnot" name="newpasswordnot" class="form-control" placeholder="请输入密码确认">-->
        <!--                        </div>-->
        <!--                        <span class="col-2 text-danger col-form-label">*</span>-->
        <!--                    </div>-->
        <div class="form-group row">
            <label for="group" class="col-2 col-form-label">部门</label>
            <div class="col-8">
                <input type="text" id="group" name="group" class="form-control"
                       placeholder="请输入部门">
            </div>
        </div>
        <div class="form-group row">
            <label for="borrow" class="col-2 col-form-label">借出事由</label>
            <div class="col-8">
                <input type="text" id="borrow" name="borrow" class="form-control"
                       placeholder="请输入借出事由">
            </div>
        </div>
        <div class="form-group row">
            <label for="device" class="col-2 col-form-label">借出设备</label>
            <div class="col-8">
                <input type="text" id="device" name="device" class="form-control"
                       placeholder="请输入借出设备">
            </div>
        </div>
        <!--                    <div class="form-group row">-->
        <!--                        <label for="borrow_time" class="col-2 col-form-label">借用时间</label>-->
        <!--                        <div class="col-8">-->
        <!--                            <input type="text" id="borrow_time" name="borrow_time" class="form-control"-->
        <!--                                   placeholder="请输入借用时间">-->
        <!--                        </div>-->
        <!--                    </div>-->
        <div class="form-group row">
            <label class="col-2 col-form-label">性别</label>
            <div class="col-8">
                <label for="man" class="col-form-label">
                    <input type="radio" id="man" name="gender" value="男" {$obj.gender == '男' ? 'checked' : ''}/>
                    男
                </label>
                <label for="woman" class="col-form-label">
                    <input type="radio" id="woman" name="gender" value="女" {$obj.gender == '女' ? 'checked' : ''}>
                    女
                </label>
            </div>
        </div>
        <div class="form-group row">
            <label for="phone" class="col-2 col-form-label">电话</label>
            <div class="col-8">
                <input type="text"  disabled value="{$obj.phone}"  id="phone" name="phone" class="form-control"
                       placeholder="请输入电话">
            </div>
        </div>
        <div class="form-group row">
            <label for="email" class="col-2 col-form-label">电子邮件</label>
            <div class="col-8">
                <input type="text" disabled value="{$obj.email}" id="email" name="email" class="form-control">
            </div>
            <span class="col-2 text-danger col-form-label">*</span>
        </div>
        <div class="form-group row">
            <label class="col-2 col-form-label">状态</label>
            <div class="col-6">
                <select name="status" id="status" class="form-control w-50  col-form-label">
                    <option value="0" {$obj.status == '待审核' ? 'selected' : ''}>待审核</option>
                    <option value="1" {$obj.status == '通过' ? 'selected' : ''}>通过</option>
                </select>
            </div>

            <div class="col-2 text-right col-form-label">
                <a href="{:url('/user')}" class="col-form-label-sm ">返回列表</a>
            </div>
        </div>
        <div class="form-group row">
            <label class="col-2 col-form-label"></label>
            <div class="col-8">
                <input type="hidden" value="{:token()}" name="__token__">
                <button class="btn btn-success w-100">修改资料</button>
            </div>
        </div>
    </fieldset>
</form>
{/block}